function tabbarinit() {
  return [
    {
      "current": 0,
      "pagePath": "/pages/jielong/Tindex/Tindex",
      "iconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/home.png",
      "selectedIconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/home_on.png",
      "text": "首页"
    },
    {
      "current": 0,
      "pagePath": "/pages/jielong/order/order",
      "iconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/jielong_off.png",
      "selectedIconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/jielong3.png",
      "text": "接龙凭证"
    },
    {
      "current": 0,
      "pagePath": "/pages/jielong/user/user",
      "iconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/person3.png",
      "selectedIconPath": "https://www.lexiangpingou.cn/addons/lexiangpingou/app/resource/images/xcxjl/user_on.png",
      "text": "我的"
    }
  ]

}
//tabbar 主入口
function tabbarmain(bindName = "tabdata", id, target) {
  var that = target;
  var bindData = {};
  var otabbar = tabbarinit();
  otabbar[id]['iconPath'] = otabbar[id]['selectedIconPath']//换当前的icon
  otabbar[id]['current'] = 1;
  bindData[bindName] = otabbar
  that.setData({ bindData });
}

module.exports = {
  tabbar: tabbarmain
}